package com.sq.partner.manager.dao;

import java.util.List;
import java.util.Map;

import com.sq.partner.manager.mybatis.model.CoreDept;
import com.sq.partner.manager.mybatis.model.TradePlanFee;
import com.sq.partner.manager.mybatis.model.XbtSwitchDto;
import com.sq.partner.manager.util.Page;


/**
 * 信保通开关
 * 
 * SQ
 *
 */
public interface XBTSwitchDao extends BaseDao {
	/***
	 * 分页查询机构
	 * @param page
	 * @return
	 * @throws Exception
	 */
	Page<CoreDept> queryDeptPageByCriteria(Page<CoreDept> page) throws Exception;
	
	/***
	 * 查询列表
	 * @param page
	 * @return
	 * @throws Exception
	 */
	Page<XbtSwitchDto> querySwichList(Page<XbtSwitchDto> page) throws Exception;
	
	/***
	 * 增加开关
	 */
	public boolean addXbtSwitchDto(XbtSwitchDto xbtSwitchDto) throws Exception;
	/***
	 * 关闭开关
	 */
	public void deleteXbtSwitchDto(String id) throws Exception;

	public void updateAmountLimit(String deptCode, String changedLimit, String loaninvoiceno, String amountLimit,String denyAmountLimit) throws Exception;

	public Page<XbtSwitchDto> queryRiskList(Page<XbtSwitchDto> page) throws Exception;

	public boolean insertAmountLimit(String deptCode, String productCode,
			String loaninvoiceno, String amountLimit,String denyAmountLimit)throws Exception;

	Map<String,String> writeBackThisLimit(Map<String, String> map) throws Exception;

}
